
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(signal LANGUAGES C)

include_directories(../lib)

set(COMPILE_ALL OFF)

list(APPEND _sources
    ../lib/daemon_inetd.c
    ../lib/daemon_init.c
    ../lib/error.c
    ../lib/gf_time.c
    ../lib/isfdtype.c
    ../lib/lock_reg.c
    ../lib/lock_test.c
    ../lib/Makefile
    ../lib/my_shm.c
    ../lib/pselect.c
    ../lib/px_ipc_name.c
    ../lib/readable_timeo.c
    ../lib/readline.c
    ../lib/readn.c
    ../lib/set_concurrency.c
    ../lib/set_nonblock.c
    ../lib/signal.c
    ../lib/signal_intr.c
    ../lib/signal_rt.c
    ../lib/signal_rt_intr.c
    ../lib/sleep_us.c
    ../lib/snprintf.c
    ../lib/timing.c
    ../lib/tv_sub.c
    ../lib/unpipc.h
    # ../lib/wrapdoor.c
    ../lib/wrappthread.c
    ../lib/wrapstdio.c
    # ../lib/wrapsunrpc.c
    ../lib/wrapunix.c
    ../lib/writable_timeo.c
    ../lib/writen.c

    client.c
    server.c
)

if (COMPILE_ALL)

else()
add_executable(mainpipe 01_mainpipe.c ${_sources})
endif()
